The present invention relates to a method of producing backup data in a storage by use of a snapshot operation, and in particular, to a storage switch and a snapshot switching method to conduct a snapshot control operation suitable for creating a snapshot of designated data.
Conventionally, the methods of creating snapshot data include, for example, a split-mirror method in which one of two disks used in the mirroring operation is separated and a copy-on-write method in which a difference of a file before and after an update operation of the file is copied. In the copy-on-write method, even when an associated instruction is issued, the difference is not actually copied in a complete form. The system conducts operation as if a copy is virtually created. When a host accesses the virtual copy, source data of the virtual copy is actually referred to. Consequently, it seems for the user as if the host instantaneously obtains the snapshot. When a host issues a request to update source data, the system temporarily stops execution of the update request to a source volume. In a snapshot volume, the system saves the data of an area as a target of the update operation to the snapshot volume at the issuance of a snapshot creation instruction. Only after the data is saved in the snapshot volume, the system reflects the update operation in the source data. Therefore, for the host to conduct a writing operation in the source data, there occurs delay if the source data has not been saved in the snapshot volume.
JP-A-11-120055 describes a method of acquiring snapshot in which a computer system is proposed to efficiently acquire snapshot. A conventional snapshot acquiring method using the copy-on-write scheme is described, for example, in “VERITAS Data Availability Solution”.
FIG. 2 shows an example of a copy-on-write method to explain how to create a snapshot in the prior art. The method of FIG. 2 is a copy-on-write method of passive copy type in which only when a writing operation is conducted, a copy is produced in a snapshot volume. This is generally conducted in the copy-on-write method.
In the copy-on-write method, a switch 201 changes a read data position as if source data 110 in a source volume 102 as an object of snapshot acquisition is copied as snapshot data 112 into a snapshot volume 103 at a virtual data position. Assume, for example, that a reference host snapshot 105 to refer to snapshot data attempts to read (206) a field of the snapshot data. Since the data copy operation in the snapshot volume has not been completed at this point of time, the read operation is actually conducted using the source volume (207). When a host 104 issues a data write request 203 for the source data 110, execution of the write request is temporarily stopped or inhibited and data associated with the request is saved in the snapshot volume (204). After the data is completely saved, a writing operation of the write request (205) is executed. Thereafter, “1” indicating completion of the copy creation is marked on a copy completion table 202. When the reference host snapshot 105 attempts to read data from the field (208) for which the copy is completed, data is read from the snapshot volume (209). Thanks to the operation, even if the original file has been updated, the data at the point of issuance of the snapshot command or instruction can be obtained by accessing the snapshot volume. However, since the writing operation is temporarily inhibited, the writing operation of the host is delayed.